package utils
{
	import flash.system.Capabilities;
	
	public class ScreenUtil
	{
		public function ScreenUtil()
		{
		}

		public static function getScreenWidth():int{
			return  Capabilities.screenResolutionX;
		}
		public static function getScreenHeight():int{
			return  Capabilities.screenResolutionY;
		}
		public static function getComponentX(componentWidth:int):int{
			var resX:int =Capabilities.screenResolutionX;  
			var wx:int = resX/2 - componentWidth/2; 
			return  wx;
		}
		public static function getComponentY(componentHeight:int):int{
			var resY:int = Capabilities.screenResolutionY;  
			var wy:int = resY/2 - componentHeight/2; 
			return  wy;
		}
		public static function setTitileWindowX(componentWidth:int):int{
			var resX:int =Capabilities.screenResolutionX; 
			var wx:int = resX - componentWidth;
			return  wx;
		}
		public static function setTitileWindowY(componentHeight:int):int{
			var resY:int = Capabilities.screenResolutionY;  
			var wy:int = resY - componentHeight; 
			return  wy;
		}
	}
}